"""
#!!===========================================================
#版权（C）2023, Huawei Technologies Co., HUTAF xDevice
#!!===========================================================
#文 件 名:      SecurityUserIamAuthWidgetCommon
#文件说明:      测试hap相关公共AW
#作   者:
#生成日期:
#!!===========================================================
"""

# -*- coding: utf-8 -*-
from devicetest.aw.OpenHarmony import CommonOH
from devicetest.core.test_case import keyword


@keyword
def enterhapseting(oh_device):
    """
    #======================================================================
    #   @Method:        enterhapseeting(oh_device)
    #   @Precondition:
    #   @Func:          启动测试hap
    #   @Param:
    #   @Param:
    #   @Example:
    #======================================================================
    """
    CommonOH.forceStopAbility(oh_device, "com.ohos.useriam_auth_widget_project")
    CommonOH.startAbility(oh_device, "EntryAbility", "com.ohos.useriam_auth_widget_project")

@keyword
def enterface_fingerprint_hapseting(oh_device):
    """
    #======================================================================
    #   @Method:        enterhapseeting(oh_device)
    #   @Precondition:
    #   @Func:          启动人脸指纹测试hap
    #   @Param:
    #   @Param:
    #   @Example:
    #======================================================================
    """
    CommonOH.forceStopAbility(oh_device, "com.example.iam_test")
    CommonOH.startAbility(oh_device, "MainAbility", "com.example.iam_test")
